package cases

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CasCasesRouter struct {}

// InitCasCasesRouter 初始化 casCases表 路由信息
func (s *CasCasesRouter) InitCasCasesRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	casCasesRouter := Router.Group("casCases").Use(middleware.OperationRecord())
	casCasesRouterWithoutRecord := Router.Group("casCases")
	casCasesRouterWithoutAuth := PublicRouter.Group("casCases")
	{
		casCasesRouter.POST("createCasCases", casCasesApi.CreateCasCases)   // 新建casCases表
		casCasesRouter.DELETE("deleteCasCases", casCasesApi.DeleteCasCases) // 删除casCases表
		casCasesRouter.DELETE("deleteCasCasesByIds", casCasesApi.DeleteCasCasesByIds) // 批量删除casCases表
		casCasesRouter.PUT("updateCasCases", casCasesApi.UpdateCasCases)    // 更新casCases表
	}
	{
		casCasesRouterWithoutRecord.GET("findCasCases", casCasesApi.FindCasCases)        // 根据ID获取casCases表
		casCasesRouterWithoutRecord.GET("getCasCasesList", casCasesApi.GetCasCasesList)  // 获取casCases表列表
	}
	{
	    casCasesRouterWithoutAuth.GET("getCasCasesDataSource", casCasesApi.GetCasCasesDataSource)  // 获取casCases表数据源
	    casCasesRouterWithoutAuth.GET("getCasCasesPublic", casCasesApi.GetCasCasesPublic)  // casCases表开放接口
	}
}
